//Div Load Routine. These calls take the functional results that are stored in the arrays and then load them to a new array that includes the
//formatting for displaying on the page. After each call we remove the data stored in the functional array so we are not being a memory hog.
if (searchRecordings)
{
fillDiv(Status, hdrStatus2, "status");
}
else
{
fillDiv(Status, hdrStatus2, "status");
}
Status.Clear();
fillDiv(AirDate, hdrAirDate, "airdate");
AirDate.Clear();
fillDiv(Channel, hdrChannel, "channel");
Channel.Clear();
fillDiv(Description, hdrDesc, "desc");
Description.Clear();
//Set the first time indicator to true so that we know that we are loading the header row and not detail rows.
bool first_time = true;
//Since all the arrays will have the same number of entries we can just use one of them as the itterator. We proccess each entry in the formatted
//arrays and add the final row level formating for each entry.
while (divStatusArray.Count > 0)
{
//Pull each entry from the formatted array.
string status = (string) divStatusArray[0];
string airdate = (string) divAirDateArray[0];
string channelinfo = (string) divChannelArray[0];
string desc = (string) divDescArray[0];
//Since we know have the current array entry as a string we can remove it from memory to help reduce resources being used
divStatusArray.Remove(status);
divAirDateArray.Remove(airdate);
divChannelArray.Remove(channelinfo);
divDescArray.Remove(desc);
//Check to see if this is the first time in the loop. If it is then we know we are working with the header row and set the line formatting accordingly.
//If it is not the first time then we know we are on the detial lines. So we combine the seperate entries into one line and add the appropriate line formatting.
else
{
CONTENTS += "<div class=\"listingRow\">\n";
CONTENTS += "<div class=\"listings\" style=\"width:15%\">\n" + status + "</div>\n" +